import Vue from 'vue'
import vueRouter from 'vue-router'

Vue.use(vueRouter)

const router = new vueRouter({
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('../pages/home.vue')
    },
    {
      path: '/classify',
      name: 'classify',
      component: () => import('../pages/classify.vue')
    },
    //九宫格路由
    {
      path: '/grid/classifylist',
      name: 'classifylist',
      component: () => import('../pages/grid/classifylist.vue')
    },
    {
      path: '/grid/gift',
      name: 'gift',
      component: () => import('../pages/grid/gift.vue')
    },
    {
      path: '/grid/cake',
      name: 'cake',
      component: () => import('../pages/grid/cake.vue')
    },
    {
      path: '/grid/baskeflower',
      name: 'baskeflower',
      component: () => import('../pages/grid/baskeflower.vue')
    },
    {
      path: '/grid/greentree',
      name: 'greentree',
      component: () => import('../pages/grid/greentree.vue')
    },
    {
      path: '/grid/lflower',
      name: 'lflower',
      component: () => import('../pages/grid/lflower.vue')
    },
    {
      path: '/infoDetail',
      name: 'infoDetail',
      component: () => import('../pages/infoDetail')
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../pages/userList/login.vue')
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('../pages/userList/register.vue')
    },
    {
      path: '/coe',
      name: 'coe',
      component: () => import('../pages/userList/coe.vue')
    },
    {
      path: '/order',
      name: 'order',
      component: () => import('../pages/userList/order.vue')
    },
    {
      path: '/setup',
      name: 'setup',
      component: () => import('../pages/userList/setup.vue')
    },
    {
      path: '/information',
      name: 'information',
      component: () => import('../pages/userList/information.vue')
    },
    {
      path: '/user',
      name: 'user',
      component: () => import('../pages/user.vue')
    },
    {
      path: '/addresslist',
      name: 'addresslist',
      component: () => import('../pages/addresses/addresslist.vue')
    },
    {
      path: '/address',
      name: 'address',
      component: () => import('../pages/addresses/address.vue')
    },
    {
      path: '/cart',
      name: 'cart',
      component: () => import('../pages/cart.vue')
    },

    {
      path: '/pay',
      name: 'pay',
      component: () => import('../pages/shopping/pay.vue')
    },

  ]

})

export default router